<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                template="layout/template.xhtml">
                       
<ui:define name="body">
    
    <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
    
    <rich:panel>
        <f:facet name="header">#{messages['application.avaliacao.label']}</f:facet>

        <s:decorate id="turma" template="layout/display.xhtml">
            <ui:define name="label">#{messages['application.turma.label']}</ui:define>
            #{avaliacaoHome.instance.turma.codTurma}
        </s:decorate>
        
        <s:decorate id="disciplina" template="layout/display.xhtml">
            <ui:define name="label">#{messages['application.disciplina.label']}</ui:define>
            #{avaliacaoHome.instance.disciplina.nomDisciplina}
        </s:decorate>

        <s:decorate id="codAvaliacao" template="layout/display.xhtml">
            <ui:define name="label">#{messages['application.nota.label.codigo']}</ui:define>
            #{avaliacaoHome.instance.codAvaliacao}
        </s:decorate>

        <div style="clear:both"/>
        
    </rich:panel>
    
    <div class="actionButtons">      

        <s:button view="/AvaliacaoEdit.xhtml" action="#{avaliacaoHome.prepareEdit}" 
                    id="edit" 
                 value="#{messages['application.label.edit']}"/>

        <s:button view="/#{empty avaliacaoFrom ? 'AvaliacaoList' : avaliacaoFrom}.xhtml"
                    id="done"
                 value="#{messages['application.label.done']}"/>

    </div>

        <rich:dataTable
				id="avaliacaoItemList"
				var="avaliacao"
				value="#{avaliacaoHome.listAvaliacaoItem}"
				columnsWidth="80%,20%">
			<h:column>
				<f:facet name="header">#{messages['application.aluno.label']}</f:facet>
				#{avaliacao.aluno.nomAluno}
			</h:column>
			<h:column>
				<f:facet name="header">#{messages['application.note.label.nota']}</f:facet>
				<h:outputText value="#{avaliacao.numNota}" />
			</h:column>
		</rich:dataTable>

</ui:define>

</ui:composition>
